package com.zimi.file.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zimi.model.PrivilegeFunction;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.InputStream;
import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
public class SysFile extends Model<PrivilegeFunction> implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String fileName;
    private String fileOriginName;
    private String filePath;
    private String fileType;
    private String md5;
    private Long size;
    private Integer uploadUser;
    private Date uploadTime;

    @Override
    protected Serializable pkVal() {
        return id;
    }

    @JSONField(serialize = false)
    private InputStream content;
}